package com.ctshk.rpc.starvip.dto.start_vip.transaction;

import com.ctshk.rpc.starvip.util.JAXBDateTimeFromater;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @BelongsProject: ctshk-cloud
 * @BelongsPackage: com.ctshk.rpc.starvip.dto.start_vip.transaction
 * @Author: hef
 * @CreateTime: 2021-04-13 20:43
 * @Description: 描述
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@XmlRootElement(name = "LoyTransaction")
public class LoyTransaction implements Serializable {
    /**
     * 交易金额
     */
    @XmlElement(name = "Amount")
    private BigDecimal amount;
    /**
     * 订单编号
     */
    @XmlElement(name = "CTSOrderNum")
    private String ctsOrderNum;
    /**
     * 人民币消费金额
     */
    @XmlElement(name = "CTSRMBAmount")
    private BigDecimal ctsRMBAmount;
    /**
     * 交易会员卡号
     */
    @XmlElement(name = "CTSTXNCardNum")
    private String ctsTXNCardNum;
    /**
     * 交易渠道
     * @enum StarVipTransactionChannel
     */
    @XmlElement(name = "TransactionChannel")
    private Integer transactionChannel;
    /**
     * 交易渠道序列号
     */
    @XmlElement(name = "CTSTransactionChannelSN")
    private String ctsTransactionChannelSN;
    /**
     * 交易机构代码号
     */
    @XmlElement(name = "CTSTransactionOrgCode")
    private String ctsTransactionOrgCode;
    /**
     * 点数子类型
     * @enum StarVipPointSubTypeCode
     */
    @XmlElement(name = "CTSPointSubType")
    private String ctsPointSubType;

    /**
     * 点数子类型代码
     * @enum StarVipPointSubTypeCode
     */
    @XmlElement(name = "CTSPointSubTypeCode")
    private String ctsPointSubTypeCode;
    /**
     * 交易币种
     * @enum StarVipCurrencyCode
     */
    @XmlElement(name = "CurrencyCode")
    private String currencyCode;
    /**
     * 集团会员编号
     */
    @XmlElement(name = "MemberId")
    private String memberId;
    /**
     * 板块交易编号
     */
    @XmlElement(name = "TransactionNumber")
    private String transactionNumber;
    /**
     * 三级产品目录编码
     */
    @XmlElement(name = "PartNumber")
    private String partNumber;
    /**
     * 点数类型
     * 固定值:港中旅积分
     */
    @XmlElement(name = "PointName")
    private String pointName;
    /**
     * 交易点数
     */
    @XmlElement(name = "Points")
    private BigDecimal points;
    /**
     * 忠诚度计划
     * 固定值:港中旅集团忠诚度计划
     */
    @XmlElement(name = "ProgramName")
    private String programName;

    /**
     * 交易日期
     */
    @XmlElement(name = "TransactionDate")
    @XmlJavaTypeAdapter(value = JAXBDateTimeFromater.class)
    private LocalDateTime transactionDate;
    /**
     * 交易子类型
     * @enum StarVipTransactionSubType
     *
     */
    @XmlElement(name = "TransactionSubType")
    private String transactionSubType;
    /**
     * 交易类型
     * @enum StarVipTransactionType
     */
    @XmlElement(name = "TransactionType")
    private String transactionType;

    /**
     * 定级积分
     */
    @XmlElement(name = "QualifyingFlag")
    private String qualifyingFlag;
    /**
     * 是否定级交易
     */
    @XmlElement(name = "CTSQualifyTxnFlag")
    private String ctsQualifyTxnFlag;
    /**
     * 合作方编号
     */
    @XmlElement(name = "PartnerLocation")
    private String partnerLocation;
    /**
     * 注释
     */
    @XmlElement(name = "Comments")
    private String Comments;
    /**
     * 板块产品编码
     */
    @XmlElement(name = "CTSProdCode")
    private String ctsProdCode;
    /**
     * 板块产品描述
     */
    @XmlElement(name = "CTSProdDesc")
    private String ctsProdDesc;
    /**
     * 状态
     */
    @XmlElement(name = "Status")
    private String status;
    /**
     * 正在处理注释
     */
    @XmlElement(name = "ProcessingComment")
    private String processingComment;

    /**
     * 可用积分
     */
    @XmlTransient
    private BigDecimal point1Value;

    @XmlTransient
    public String getCtsPointSubTypeCode() {
        return ctsPointSubTypeCode;
    }

    @XmlTransient
    public String getQualifyingFlag() {
        return qualifyingFlag;
    }

    @XmlTransient
    public String getCtsQualifyTxnFlag() {
        return ctsQualifyTxnFlag;
    }

    @XmlTransient
    public String getPartnerLocation() {
        return partnerLocation;
    }

    @XmlTransient
    public String getComments() {
        return Comments;
    }

    @XmlTransient
    public String getCtsProdCode() {
        return ctsProdCode;
    }

    @XmlTransient
    public String getCtsProdDesc() {
        return ctsProdDesc;
    }

    @XmlTransient
    public String getStatus() {
        return status;
    }

    @XmlTransient
    public String getProcessingComment() {
        return processingComment;
    }

    @XmlTransient
    public BigDecimal getAmount() {
        return amount;
    }

    @XmlTransient
    public BigDecimal getCtsRMBAmount() {
        return ctsRMBAmount;
    }

    @XmlTransient
    public BigDecimal getPoints() {
        return points;
    }

    @XmlTransient
    public LocalDateTime getTransactionDate() {
        return transactionDate;
    }

    @XmlTransient
    public String getCtsOrderNum() {
        return ctsOrderNum;
    }


    @XmlTransient
    public String getCtsTXNCardNum() {
        return ctsTXNCardNum;
    }

    @XmlTransient
    public String getCtsTransactionChannelSN() {
        return ctsTransactionChannelSN;
    }

    @XmlTransient
    public String getCtsTransactionOrgCode() {
        return ctsTransactionOrgCode;
    }

    @XmlTransient
    public String getCtsPointSubType() {
        return ctsPointSubType;
    }

    @XmlTransient
    public String getCurrencyCode() {
        return currencyCode;
    }

    @XmlTransient
    public String getMemberId() {
        return memberId;
    }

    @XmlTransient
    public String getTransactionNumber() {
        return transactionNumber;
    }

    @XmlTransient
    public String getPartNumber() {
        return partNumber;
    }

    @XmlTransient
    public String getPointName() {
        return pointName;
    }


    @XmlTransient
    public String getProgramName() {
        return programName;
    }

    @XmlTransient
    public Integer getTransactionChannel() {
        return transactionChannel;
    }


    @XmlTransient
    public String getTransactionSubType() {
        return transactionSubType;
    }

    @XmlTransient
    public String getTransactionType() {
        return transactionType;
    }
}
